import type { ScreenSource } from 'src/preload/electron-api'
import './DesktopPreview.less'

type Props = { source: ScreenSource }

export function DesktopPreview(props: Props) {
  const { source } = props
  return (
    <div className="desktop-preview">
      <div className="title">
        {source.appIcon && <img className="app-icon" src={source.appIcon} />}
        {source.name}
      </div>
      <img src={source.thumbnail} />
    </div>
  )
}
